﻿<UserControl x:Class="Chapters.Chapter06.HoverInteractorExample"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:Chapter06="clr-namespace:FSharp.Chapter6;assembly=FSharpLibrary">
	<UserControl.Resources>
		<DataTemplate x:Key="AdornerTemplate">
			<Border BorderBrush="Gray"
					BorderThickness="1"
					Background="#5F000000"
					SnapsToDevicePixels="True"
					CornerRadius="15"
					Width="130"
					Height="30">
				<TextBlock Text="{Binding StringFormat=ToolTip for }"
						   FontFamily="Times New Roman"
						   FontSize="13"
						   VerticalAlignment="Center"
						   HorizontalAlignment="Center"
						   Foreground="White"/>
			</Border>
		</DataTemplate>

		<DataTemplate x:Key="ItemTemplate">
			<Border Background="Transparent"
					BorderBrush="DarkGray"
					BorderThickness="0,0,0,1"
					Padding="5">
				<TextBlock Text="{Binding}" />
			</Border>
		</DataTemplate>
	</UserControl.Resources>
	<Grid>
		<ListBox x:Name="_listBox"
				 Width="200"
				 Height="400"
				 Chapter06:HoverInteractor.UseHover="True"
				 HorizontalContentAlignment="Stretch"
				 ItemTemplate="{StaticResource ItemTemplate}" 
				 ScrollViewer.CanContentScroll="False"/>
	</Grid>
</UserControl>
 